var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.isQuestFinished(17641) && cm.getQuestStatus(17648) == 0) {
                cm.sendNormalTalk("准备好了吗？我们出发吧！", 0, 9390235, false, true)
            } else {
                cm.sendNormalTalk("现在不是乘船的时候。", 0, 9390235, false, true);
                cm.dispose()
            }
        } else {
            cm.warp(865010001, 0);
            cm.dispose()
        }
    }
};